package com.zhonggong.three;


public class FristWork {

	public static int sumDiqits(long n) {
		
		String number =String.valueOf(n); 
		int sum=0;
		for(int i=0;i<number.length();i++) {
			sum+=number.charAt(i)-48;
		}
		return sum;
	}
	
	public static double feetToMeter(double feet) {
		
		return 0.305*feet;
	}
	
	public static double meterToFeet(double meter) {
		
		return meter/0.305;
	}
	
	public static void printChars(char ch1, char ch2, int numberPerLine) {
		int count = 0;
		for(char i=ch1;i<=ch2;i++) {
			count++;
			System.out.print(i);
			if (count%numberPerLine==0) {
				System.out.println();
			}
		}
	}
	
	public static void printMatrix(int n) {
		
		for(int i=1;i<=n;i++) {
			System.out.println();
			for(int j=1;j<=n;j++) {
				System.out.print(1);
			}
		}
	}
}
